package com.nbicc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nbicc.pojo.Finan;
import com.nbicc.pojo.Record;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ClassName:
 * @Author: 仄言in
 * @Desctiption: (描述)
 * @Date: 2021/5/11 13:50
 * @Version 1.0 (版本)
 */
@Repository
@Mapper
public interface RecordMapper extends BaseMapper<Record> {
    @Select("select * from recordinfo where unitname= #{unitname}")
    List<Record> selectAllSB(String unitname);
    @Select("select sum(sum) from recordinfo")
    Double totalRowRecord();
    @Insert("insert into recordinfo values(null,#{pptime},#{unitname},#{sum})")
    int insertRecord(Record record);
}
